﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PagePlaceMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<!-- breadcrumbs -->
<div class="breadcrumbs">
	<div class="shell">
		<p>Some intro message goes here</p>
		<h2>Our Blog</h2>
	</div>
</div>
<!-- end breadcrumbs -->
<!-- main -->
<div id="main">
	<div class="shell">
		
		<!-- content -->
		<div id="content" class="left">
			<%var article = (DefaultDataPack)ViewData["article"]; %>
			<!-- blog entry -->
			<div class="blog-entry">
				<div class="entry">
					<h2 class="title"><%=article.TITLE%></h2>
					<div class="entry_details">
						<span class="date"><%=article.DATE%></span>
						<span class="author"><%=article.AUTHOR%></span>
						<a href="#" class="comments"><%=article.ReplyTime%> comments</a>
						<div class="cl">&nbsp;</div>
					</div>
					<div class="main-image">
						<img src="<%=article.URL %>" alt="" />
					</div>
					<%=article.CONTENT.Replace("&lt;", "<").Replace("&gt;", ">")%>
				</div>
			</div>
			<!-- end blog entry -->
			
			<!-- blog comments -->
			<div class="blog-comments">
				<div class="entry">
					<h2 class="title"><%=article.ReplyTime%> Comments Posted</h2>
                    <%var list = (List<DefaultDataPack>)ViewData["replay"];
                      foreach (var item in list)
                      { %>
					<!-- comment item -->
					<div class="comment-item">
						<div class="author">
							<a href="#" class="avatar"><img src="/content/images/comment-avatar1.gif" alt="" /></a>
							<span class="username"><%=item.AUTHOR %></span>
							<span class="date"><%=item.DATE %></span>
						</div>
						<div class="box comment-box">
							<div class="box-b">
								<div class="box-t">
									<div class="text-holder" style="min-height:80px;height:auto;">
										<p><%=item.CONTENT %></p>
									</div>
									<div class="cl">&nbsp;</div>
								</div>
							</div>
						</div>
						<div class="cl">&nbsp;</div>
					</div>
					<!-- end comment item -->
                    <%} %>
				</div>
			</div>
			<!-- end blog comments -->
			<!-- pagination -->
			<%=ViewData["pagination"]%>
			<!-- end pagination -->
			
			<!-- comment form -->
			<div class="comment-form">
				<div class="entry">
					<h2 class="title">发表评论</h2>
					<form action="/Home/PostArticleComment/<%=ViewData["Id"] %>" class="validate-form contact-form" method="post">
						<div class="msg-thanks">
							<p><strong>操作成功！</strong></p>
						</div>
						<div class="msg-alert">
							<p><strong>操作失败!</strong>请填写必填列</p>
						</div>
						<div class="row">
                        <input type="hidden" name="author" value="<%=ViewData["nickname"] %>" />
							<input type="text" name="fname-field" disabled="disabled" style="background-color:#eee"; value="<%=ViewData["nickname"] %>" class="field required" />
							<label>昵称： <span>(required)</span></label>
							<div class="cl">&nbsp;</div>
						</div>
						<div class="row">
							<textarea name="content" class="field message required" cols="100" rows="5"></textarea>
							<div class="cl">&nbsp;</div>
						</div>
						<div class="row">
							<div class="btn-holder">
								<input type="submit" class="submit-btn" value="提交" />
								<div class="cl">&nbsp;</div>
							</div>
							<div class="cl">&nbsp;</div>
						</div>
					</form>
				</div>
			</div>
			<!-- end comment form -->

		</div>
		<!-- end content -->
		
		<!-- sidebar -->
		<div id="sidebar" class="right">
			
			<!-- sidebar widget -->
			<div class="entry sidebar-widget">
				<h2 class="title">Categories</h2>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc ornare consequat .</p>
				<ul>
				    <li><a href="#">Lorem ipsum dolor sit amet</a></li>
				    <li><a href="#">Consectetuer adipiscing elit</a></li>
				    <li><a href="#">Proin sed odio et ante adipiscing</a></li>
				    <li><a href="#">Mazim sensibus et usu</a></li>
				    <li><a href="#">Nulla dignisim rutrum eleifen</a></li>
				</ul>
			</div>
			<!-- end sidebar widget -->
			
            <!-- popular posts widget -->
			<div class="entry">
				<h2 class="title">Popular Posts</h2>
                <%var popular = (List<DefaultDataPack>)ViewData["Popular"];
                    int count = popular.Count;
                    for (int i = 0; i < count; i++)
                    { 
                        if(i == count -1)
                        {%>
                        <div class="popular-post-item">
                        <%}
                        else
                        { %>
                        <div class="popular-post-item popular-post-item-last">
                      <%} %>
                              <a href="/Home/Blog/<%=popular[i].ID %>" class="thumb"><img src="<%=popular[i].URL %>" alt="" /></a>
					        <div class="text-holder">
						        <a href="/Home/Blog/<%=popular[i].ID %>"><%=popular[i].TITLE %></a>
						        <span><%=popular[i].DATE %></span>
					        </div>
					        <div class="cl">&nbsp;</div>
				        </div>
                  <%} %>
			</div>
			<!-- end popular posts widget -->
			
			<!-- archive widget -->
			<div class="entry">
				<h2 class="title">Archive</h2>
				<ul class="archive-list">
                <%var newarticles = (List<DefaultDataPack>)ViewData["NewArticles"];
                    foreach(var item in newarticles)
                    { %>
                    <li><a href="/Home/Article/<%=item.ID %>"><%=item.TITLE %>  <span>(<%=item.ReplyTime %>)</span></a></li>
                  <%} %>
				</ul>
			</div>
			<!-- end archive widget -->
			
				<!-- feature-in widget -->
			<div class="entry">
				<h2 class="title">Featured In</h2>
				<a href="http://cssmayo.com/" class="left css_mayo"></a>
				<a href="http://www.netmag.co.uk/" class="left net_mag"></a>
				<a href="http://www.bbc.co.uk/" class="left bbc"></a>
				<a href="http://digg.com/" class="left digg"></a>
				<div class="cl">&nbsp;</div>
			</div>
			<!-- end feature-in widget -->
			
			<!-- ads -->
			<div class="entry">
				<h2 class="title">Advertisments</h2>
				<a href="http://htmlmafia.com" class="ads"><img src="/content/images/htmlmafia.gif" alt="" /></a>
				<a href="http://mailbakery.com" class="ads"><img src="/content/images/mailbakery.gif" alt="" /></a>
			</div>
			<!-- end ads -->
			
		</div>
		<!-- end sidebar -->
		
		<div class="cl">&nbsp;</div>
	</div>
</div>
<!-- end main -->
		<!-- footer push -->
		<div id="footer-push" class="notext">&nbsp;</div>
		<!-- end footer push -->
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
</asp:Content>
